package c.a.a.d0.h0;

import c.a.a.d0.h0.c.a;
import c.a.a.d0.h0.c.b;
import g.e;
import g.g;
import g.h;
import java.io.EOFException;
import java.io.IOException;
import java.util.Objects;

/* compiled from: JsonUtf8Reader */
public final class d extends c {
    public static final h l = h.e("'\\");
    public static final h m = h.e("\"\\");
    public static final h n = h.e("{}[]:, \n\t\r\f/\\;#=");
    public static final h o = h.e("\n\r");
    public static final h p = h.e("*/");
    public final g f;
    public final e g;
    public int h = 0;
    public long i;
    public int j;
    public String k;

    public d(g gVar) {
        Objects.requireNonNull(gVar, "source == null");
        this.f = gVar;
        this.g = gVar.A();
        v0(6);
    }

    public final void A0() throws IOException {
        z0("Use JsonReader.setLenient(true) to accept malformed JSON");
        throw null;
    }

    /* JADX WARNING: Removed duplicated region for block: B:79:0x0121  */
    /* JADX WARNING: Removed duplicated region for block: B:78:0x0120 A:{RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:78:0x0120 A:{RETURN} */
    /* JADX WARNING: Removed duplicated region for block: B:79:0x0121  */
    /* JADX WARNING: Missing block: B:82:0x0131, code skipped:
            r2 = 2;
     */
    /* JADX WARNING: Missing block: B:121:0x01a8, code skipped:
            if (D0(r2) != false) goto L_0x020e;
     */
    /* JADX WARNING: Missing block: B:122:0x01ab, code skipped:
            if (r1 != 2) goto L_0x01d1;
     */
    /* JADX WARNING: Missing block: B:123:0x01ad, code skipped:
            if (r6 == 0) goto L_0x01d0;
     */
    /* JADX WARNING: Missing block: B:125:0x01b3, code skipped:
            if (r7 != Long.MIN_VALUE) goto L_0x01b7;
     */
    /* JADX WARNING: Missing block: B:126:0x01b5, code skipped:
            if (r9 == null) goto L_0x01d0;
     */
    /* JADX WARNING: Missing block: B:128:0x01bb, code skipped:
            if (r7 != 0) goto L_0x01bf;
     */
    /* JADX WARNING: Missing block: B:129:0x01bd, code skipped:
            if (r9 != null) goto L_0x01d0;
     */
    /* JADX WARNING: Missing block: B:130:0x01bf, code skipped:
            if (r9 == null) goto L_0x01c2;
     */
    /* JADX WARNING: Missing block: B:131:0x01c2, code skipped:
            r7 = -r7;
     */
    /* JADX WARNING: Missing block: B:132:0x01c3, code skipped:
            r0.i = r7;
            r0.g.f((long) r5);
            r15 = 16;
            r0.h = 16;
     */
    /* JADX WARNING: Missing block: B:133:0x01d0, code skipped:
            r2 = 2;
     */
    /* JADX WARNING: Missing block: B:134:0x01d1, code skipped:
            if (r1 == r2) goto L_0x01d9;
     */
    /* JADX WARNING: Missing block: B:136:0x01d4, code skipped:
            if (r1 == 4) goto L_0x01d9;
     */
    /* JADX WARNING: Missing block: B:138:0x01d7, code skipped:
            if (r1 != 7) goto L_0x020e;
     */
    /* JADX WARNING: Missing block: B:139:0x01d9, code skipped:
            r0.j = r5;
            r15 = 17;
            r0.h = 17;
     */
    public final int B0() throws java.io.IOException {
        /*
        r17 = this;
        r0 = r17;
        r1 = r0.b;
        r2 = r0.a;
        r3 = r2 + -1;
        r3 = r1[r3];
        r5 = 34;
        r6 = 93;
        r7 = 59;
        r8 = 44;
        r9 = 6;
        r10 = 3;
        r11 = 7;
        r12 = 5;
        r13 = 4;
        r14 = 2;
        r15 = 0;
        r16 = 0;
        r4 = 1;
        if (r3 != r4) goto L_0x0022;
    L_0x001e:
        r2 = r2 - r4;
        r1[r2] = r14;
        goto L_0x0082;
    L_0x0022:
        if (r3 != r14) goto L_0x0040;
    L_0x0024:
        r1 = r0.E0(r4);
        r2 = r0.g;
        r2.q0();
        if (r1 == r8) goto L_0x0082;
    L_0x002f:
        if (r1 == r7) goto L_0x003c;
    L_0x0031:
        if (r1 != r6) goto L_0x0036;
    L_0x0033:
        r0.h = r13;
        return r13;
    L_0x0036:
        r1 = "Unterminated array";
        r0.z0(r1);
        throw r16;
    L_0x003c:
        r17.A0();
        throw r16;
    L_0x0040:
        if (r3 == r10) goto L_0x026c;
    L_0x0042:
        if (r3 != r12) goto L_0x0046;
    L_0x0044:
        goto L_0x026c;
    L_0x0046:
        if (r3 != r13) goto L_0x0066;
    L_0x0048:
        r2 = r2 - r4;
        r1[r2] = r12;
        r1 = r0.E0(r4);
        r2 = r0.g;
        r2.q0();
        r2 = 58;
        if (r1 == r2) goto L_0x0082;
    L_0x0058:
        r2 = 61;
        if (r1 == r2) goto L_0x0062;
    L_0x005c:
        r1 = "Expected ':'";
        r0.z0(r1);
        throw r16;
    L_0x0062:
        r17.A0();
        throw r16;
    L_0x0066:
        if (r3 != r9) goto L_0x006c;
    L_0x0068:
        r2 = r2 - r4;
        r1[r2] = r11;
        goto L_0x0082;
    L_0x006c:
        if (r3 != r11) goto L_0x007e;
    L_0x006e:
        r1 = r0.E0(r15);
        r2 = -1;
        if (r1 != r2) goto L_0x007a;
    L_0x0075:
        r1 = 18;
        r0.h = r1;
        return r1;
    L_0x007a:
        r17.A0();
        throw r16;
    L_0x007e:
        r1 = 8;
        if (r3 == r1) goto L_0x0264;
    L_0x0082:
        r1 = r0.E0(r4);
        if (r1 == r5) goto L_0x025a;
    L_0x0088:
        r2 = 39;
        if (r1 == r2) goto L_0x0256;
    L_0x008c:
        if (r1 == r8) goto L_0x0246;
    L_0x008e:
        if (r1 == r7) goto L_0x0246;
    L_0x0090:
        r2 = 91;
        if (r1 == r2) goto L_0x023d;
    L_0x0094:
        if (r1 == r6) goto L_0x0232;
    L_0x0096:
        r2 = 123; // 0x7b float:1.72E-43 double:6.1E-322;
        if (r1 == r2) goto L_0x022a;
    L_0x009a:
        r1 = r0.g;
        r2 = 0;
        r1 = r1.r(r2);
        r5 = 116; // 0x74 float:1.63E-43 double:5.73E-322;
        if (r1 == r5) goto L_0x00c8;
    L_0x00a6:
        r5 = 84;
        if (r1 != r5) goto L_0x00ab;
    L_0x00aa:
        goto L_0x00c8;
    L_0x00ab:
        r5 = 102; // 0x66 float:1.43E-43 double:5.04E-322;
        if (r1 == r5) goto L_0x00c2;
    L_0x00af:
        r5 = 70;
        if (r1 != r5) goto L_0x00b4;
    L_0x00b3:
        goto L_0x00c2;
    L_0x00b4:
        r5 = 110; // 0x6e float:1.54E-43 double:5.43E-322;
        if (r1 == r5) goto L_0x00bc;
    L_0x00b8:
        r5 = 78;
        if (r1 != r5) goto L_0x00df;
    L_0x00bc:
        r1 = "null";
        r5 = "NULL";
        r6 = 7;
        goto L_0x00cd;
    L_0x00c2:
        r1 = "false";
        r5 = "FALSE";
        r6 = 6;
        goto L_0x00cd;
    L_0x00c8:
        r1 = "true";
        r5 = "TRUE";
        r6 = 5;
    L_0x00cd:
        r7 = r1.length();
        r8 = 1;
    L_0x00d2:
        if (r8 >= r7) goto L_0x00fd;
    L_0x00d4:
        r15 = r0.f;
        r11 = r8 + 1;
        r12 = (long) r11;
        r12 = r15.i(r12);
        if (r12 != 0) goto L_0x00e1;
    L_0x00df:
        r6 = 0;
        goto L_0x011e;
    L_0x00e1:
        r12 = r0.g;
        r9 = (long) r8;
        r9 = r12.r(r9);
        r10 = r1.charAt(r8);
        if (r9 == r10) goto L_0x00f5;
    L_0x00ee:
        r8 = r5.charAt(r8);
        if (r9 == r8) goto L_0x00f5;
    L_0x00f4:
        goto L_0x00df;
    L_0x00f5:
        r8 = r11;
        r9 = 6;
        r10 = 3;
        r11 = 7;
        r12 = 5;
        r13 = 4;
        r15 = 0;
        goto L_0x00d2;
    L_0x00fd:
        r1 = r0.f;
        r5 = r7 + 1;
        r8 = (long) r5;
        r1 = r1.i(r8);
        if (r1 == 0) goto L_0x0116;
    L_0x0108:
        r1 = r0.g;
        r8 = (long) r7;
        r1 = r1.r(r8);
        r1 = r0.D0(r1);
        if (r1 == 0) goto L_0x0116;
    L_0x0115:
        goto L_0x00df;
    L_0x0116:
        r1 = r0.g;
        r7 = (long) r7;
        r1.f(r7);
        r0.h = r6;
    L_0x011e:
        if (r6 == 0) goto L_0x0121;
    L_0x0120:
        return r6;
    L_0x0121:
        r7 = r2;
        r1 = 0;
        r5 = 0;
        r6 = 1;
        r9 = 0;
    L_0x0126:
        r10 = r0.f;
        r11 = r5 + 1;
        r2 = (long) r11;
        r2 = r10.i(r2);
        if (r2 != 0) goto L_0x0134;
    L_0x0131:
        r2 = 2;
        goto L_0x01ab;
    L_0x0134:
        r2 = r0.g;
        r13 = (long) r5;
        r2 = r2.r(r13);
        r12 = 43;
        if (r2 == r12) goto L_0x0201;
    L_0x013f:
        r12 = 69;
        if (r2 == r12) goto L_0x01f5;
    L_0x0143:
        r12 = 101; // 0x65 float:1.42E-43 double:5.0E-322;
        if (r2 == r12) goto L_0x01f5;
    L_0x0147:
        r12 = 45;
        if (r2 == r12) goto L_0x01e8;
    L_0x014b:
        r12 = 46;
        if (r2 == r12) goto L_0x01e0;
    L_0x014f:
        r12 = 48;
        if (r2 < r12) goto L_0x01a4;
    L_0x0153:
        r12 = 57;
        if (r2 <= r12) goto L_0x0158;
    L_0x0157:
        goto L_0x01a4;
    L_0x0158:
        if (r1 == r4) goto L_0x019a;
    L_0x015a:
        if (r1 != 0) goto L_0x015d;
    L_0x015c:
        goto L_0x019a;
    L_0x015d:
        r5 = 2;
        if (r1 != r5) goto L_0x0189;
    L_0x0160:
        r12 = 0;
        r5 = (r7 > r12 ? 1 : (r7 == r12 ? 0 : -1));
        if (r5 != 0) goto L_0x0168;
    L_0x0166:
        goto L_0x020e;
    L_0x0168:
        r12 = 10;
        r12 = r12 * r7;
        r2 = r2 + -48;
        r14 = r11;
        r10 = (long) r2;
        r12 = r12 - r10;
        r10 = -922337203685477580; // 0xf333333333333334 float:4.1723254E-8 double:-8.390303882365713E246;
        r2 = (r7 > r10 ? 1 : (r7 == r10 ? 0 : -1));
        if (r2 > 0) goto L_0x0183;
    L_0x017a:
        if (r2 != 0) goto L_0x0181;
    L_0x017c:
        r2 = (r12 > r7 ? 1 : (r12 == r7 ? 0 : -1));
        if (r2 >= 0) goto L_0x0181;
    L_0x0180:
        goto L_0x0183;
    L_0x0181:
        r2 = 0;
        goto L_0x0184;
    L_0x0183:
        r2 = 1;
    L_0x0184:
        r2 = r2 & r6;
        r6 = r2;
        r7 = r12;
        r3 = 6;
        goto L_0x01a1;
    L_0x0189:
        r14 = r11;
        r2 = 3;
        if (r1 != r2) goto L_0x0192;
    L_0x018d:
        r1 = 4;
        r2 = 7;
        r3 = 6;
        goto L_0x0208;
    L_0x0192:
        r2 = 5;
        r3 = 6;
        if (r1 == r2) goto L_0x0198;
    L_0x0196:
        if (r1 != r3) goto L_0x01a1;
    L_0x0198:
        r1 = 7;
        goto L_0x01a1;
    L_0x019a:
        r14 = r11;
        r3 = 6;
        r2 = r2 + -48;
        r1 = -r2;
        r7 = (long) r1;
        r1 = 2;
    L_0x01a1:
        r2 = 7;
        goto L_0x0208;
    L_0x01a4:
        r2 = r0.D0(r2);
        if (r2 != 0) goto L_0x020e;
    L_0x01aa:
        goto L_0x0131;
    L_0x01ab:
        if (r1 != r2) goto L_0x01d1;
    L_0x01ad:
        if (r6 == 0) goto L_0x01d0;
    L_0x01af:
        r2 = -9223372036854775808;
        r4 = (r7 > r2 ? 1 : (r7 == r2 ? 0 : -1));
        if (r4 != 0) goto L_0x01b7;
    L_0x01b5:
        if (r9 == 0) goto L_0x01d0;
    L_0x01b7:
        r2 = 0;
        r4 = (r7 > r2 ? 1 : (r7 == r2 ? 0 : -1));
        if (r4 != 0) goto L_0x01bf;
    L_0x01bd:
        if (r9 != 0) goto L_0x01d0;
    L_0x01bf:
        if (r9 == 0) goto L_0x01c2;
    L_0x01c1:
        goto L_0x01c3;
    L_0x01c2:
        r7 = -r7;
    L_0x01c3:
        r0.i = r7;
        r1 = r0.g;
        r2 = (long) r5;
        r1.f(r2);
        r15 = 16;
        r0.h = r15;
        goto L_0x020f;
    L_0x01d0:
        r2 = 2;
    L_0x01d1:
        if (r1 == r2) goto L_0x01d9;
    L_0x01d3:
        r2 = 4;
        if (r1 == r2) goto L_0x01d9;
    L_0x01d6:
        r2 = 7;
        if (r1 != r2) goto L_0x020e;
    L_0x01d9:
        r0.j = r5;
        r15 = 17;
        r0.h = r15;
        goto L_0x020f;
    L_0x01e0:
        r14 = r11;
        r2 = 7;
        r3 = 6;
        r5 = 2;
        if (r1 != r5) goto L_0x020e;
    L_0x01e6:
        r1 = 3;
        goto L_0x0208;
    L_0x01e8:
        r14 = r11;
        r2 = 7;
        r3 = 6;
        r5 = 2;
        if (r1 != 0) goto L_0x01f1;
    L_0x01ee:
        r1 = 1;
        r9 = 1;
        goto L_0x0208;
    L_0x01f1:
        r11 = 5;
        if (r1 != r11) goto L_0x020e;
    L_0x01f4:
        goto L_0x0207;
    L_0x01f5:
        r14 = r11;
        r2 = 7;
        r3 = 6;
        r5 = 2;
        r11 = 5;
        if (r1 == r5) goto L_0x01ff;
    L_0x01fc:
        r5 = 4;
        if (r1 != r5) goto L_0x020e;
    L_0x01ff:
        r1 = 5;
        goto L_0x0208;
    L_0x0201:
        r14 = r11;
        r2 = 7;
        r3 = 6;
        r11 = 5;
        if (r1 != r11) goto L_0x020e;
    L_0x0207:
        r1 = 6;
    L_0x0208:
        r5 = r14;
        r2 = 0;
        r14 = 2;
        goto L_0x0126;
    L_0x020e:
        r15 = 0;
    L_0x020f:
        if (r15 == 0) goto L_0x0212;
    L_0x0211:
        return r15;
    L_0x0212:
        r1 = r0.g;
        r2 = 0;
        r1 = r1.r(r2);
        r1 = r0.D0(r1);
        if (r1 != 0) goto L_0x0226;
    L_0x0220:
        r1 = "Expected value";
        r0.z0(r1);
        throw r16;
    L_0x0226:
        r17.A0();
        throw r16;
    L_0x022a:
        r1 = r0.g;
        r1.q0();
        r0.h = r4;
        return r4;
    L_0x0232:
        if (r3 != r4) goto L_0x0246;
    L_0x0234:
        r1 = r0.g;
        r1.q0();
        r1 = 4;
        r0.h = r1;
        return r1;
    L_0x023d:
        r1 = r0.g;
        r1.q0();
        r1 = 3;
        r0.h = r1;
        return r1;
    L_0x0246:
        if (r3 == r4) goto L_0x0252;
    L_0x0248:
        r1 = 2;
        if (r3 != r1) goto L_0x024c;
    L_0x024b:
        goto L_0x0252;
    L_0x024c:
        r1 = "Unexpected value";
        r0.z0(r1);
        throw r16;
    L_0x0252:
        r17.A0();
        throw r16;
    L_0x0256:
        r17.A0();
        throw r16;
    L_0x025a:
        r1 = r0.g;
        r1.q0();
        r1 = 9;
        r0.h = r1;
        return r1;
    L_0x0264:
        r1 = new java.lang.IllegalStateException;
        r2 = "JsonReader is closed";
        r1.<init>(r2);
        throw r1;
    L_0x026c:
        r2 = r2 - r4;
        r6 = 4;
        r1[r2] = r6;
        r1 = 125; // 0x7d float:1.75E-43 double:6.2E-322;
        r2 = 5;
        if (r3 != r2) goto L_0x0292;
    L_0x0275:
        r2 = r0.E0(r4);
        r6 = r0.g;
        r6.q0();
        if (r2 == r8) goto L_0x0292;
    L_0x0280:
        if (r2 == r7) goto L_0x028e;
    L_0x0282:
        if (r2 != r1) goto L_0x0288;
    L_0x0284:
        r1 = 2;
        r0.h = r1;
        return r1;
    L_0x0288:
        r1 = "Unterminated object";
        r0.z0(r1);
        throw r16;
    L_0x028e:
        r17.A0();
        throw r16;
    L_0x0292:
        r2 = r0.E0(r4);
        if (r2 == r5) goto L_0x02bd;
    L_0x0298:
        r4 = 39;
        if (r2 == r4) goto L_0x02b4;
    L_0x029c:
        if (r2 != r1) goto L_0x02b0;
    L_0x029e:
        r1 = 5;
        if (r3 == r1) goto L_0x02aa;
    L_0x02a1:
        r1 = r0.g;
        r1.q0();
        r1 = 2;
        r0.h = r1;
        return r1;
    L_0x02aa:
        r1 = "Expected name";
        r0.z0(r1);
        throw r16;
    L_0x02b0:
        r17.A0();
        throw r16;
    L_0x02b4:
        r1 = r0.g;
        r1.q0();
        r17.A0();
        throw r16;
    L_0x02bd:
        r1 = r0.g;
        r1.q0();
        r1 = 13;
        r0.h = r1;
        return r1;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.a.a.d0.h0.d.B0():int");
    }

    public final int C0(String str, a aVar) {
        int length = aVar.a.length;
        for (int i = 0; i < length; i++) {
            if (str.equals(aVar.a[i])) {
                this.h = 0;
                this.c[this.a - 1] = str;
                return i;
            }
        }
        return -1;
    }

    public final boolean D0(int i) throws IOException {
        if (!(i == 9 || i == 10 || i == 12 || i == 13 || i == 32)) {
            if (i != 35) {
                if (i != 44) {
                    if (!(i == 47 || i == 61)) {
                        if (!(i == 123 || i == 125 || i == 58)) {
                            if (i != 59) {
                                switch (i) {
                                    case 91:
                                    case 93:
                                        break;
                                    case 92:
                                        break;
                                    default:
                                        return true;
                                }
                            }
                        }
                    }
                }
            }
            A0();
            throw null;
        }
        return false;
    }

    public final int E0(boolean z) throws IOException {
        int i = 0;
        while (true) {
            int i2 = i + 1;
            if (this.f.i((long) i2)) {
                byte r = this.g.r((long) i);
                if (r == (byte) 10 || r == (byte) 32 || r == (byte) 13 || r == (byte) 9) {
                    i = i2;
                } else {
                    this.g.f((long) (i2 - 1));
                    if (r == (byte) 47) {
                        if (!this.f.i(2)) {
                            return r;
                        }
                        A0();
                        throw null;
                    } else if (r != (byte) 35) {
                        return r;
                    } else {
                        A0();
                        throw null;
                    }
                }
            } else if (!z) {
                return -1;
            } else {
                throw new EOFException("End of input");
            }
        }
    }

    public final String F0(h hVar) throws IOException {
        StringBuilder stringBuilder = null;
        while (true) {
            long Y = this.f.Y(hVar);
            if (Y == -1) {
                z0("Unterminated string");
                throw null;
            } else if (this.g.r(Y) == (byte) 92) {
                if (stringBuilder == null) {
                    stringBuilder = new StringBuilder();
                }
                stringBuilder.append(this.g.t0(Y));
                this.g.q0();
                stringBuilder.append(H0());
            } else if (stringBuilder == null) {
                String t0 = this.g.t0(Y);
                this.g.q0();
                return t0;
            } else {
                stringBuilder.append(this.g.t0(Y));
                this.g.q0();
                return stringBuilder.toString();
            }
        }
    }

    public final String G0() throws IOException {
        long Y = this.f.Y(n);
        return Y != -1 ? this.g.t0(Y) : this.g.s0();
    }

    public final char H0() throws IOException {
        if (this.f.i(1)) {
            byte q0 = this.g.q0();
            if (q0 == (byte) 10 || q0 == (byte) 34 || q0 == (byte) 39 || q0 == (byte) 47 || q0 == (byte) 92) {
                return (char) q0;
            }
            if (q0 == (byte) 98) {
                return 8;
            }
            if (q0 == (byte) 102) {
                return 12;
            }
            if (q0 == (byte) 110) {
                return 10;
            }
            if (q0 == (byte) 114) {
                return 13;
            }
            if (q0 == (byte) 116) {
                return 9;
            }
            if (q0 != (byte) 117) {
                StringBuilder g = c.b.a.a.a.g("Invalid escape sequence: \\");
                g.append((char) q0);
                z0(g.toString());
                throw null;
            } else if (this.f.i(4)) {
                char c = 0;
                for (int i = 0; i < 4; i++) {
                    int i2;
                    byte r = this.g.r((long) i);
                    c = (char) (c << 4);
                    if (r < (byte) 48 || r > (byte) 57) {
                        if (r >= (byte) 97 && r <= (byte) 102) {
                            i2 = r - 97;
                        } else if (r < (byte) 65 || r > (byte) 70) {
                            StringBuilder g2 = c.b.a.a.a.g("\\u");
                            g2.append(this.g.t0(4));
                            z0(g2.toString());
                            throw null;
                        } else {
                            i2 = r - 65;
                        }
                        i2 += 10;
                    } else {
                        i2 = r - 48;
                    }
                    c = (char) (i2 + c);
                }
                this.g.f(4);
                return c;
            } else {
                StringBuilder g3 = c.b.a.a.a.g("Unterminated escape sequence at path ");
                g3.append(s());
                throw new EOFException(g3.toString());
            }
        }
        z0("Unterminated escape sequence");
        throw null;
    }

    public final void I0(h hVar) throws IOException {
        while (true) {
            long Y = this.f.Y(hVar);
            if (Y == -1) {
                z0("Unterminated string");
                throw null;
            } else if (this.g.r(Y) == (byte) 92) {
                this.g.f(Y + 1);
                H0();
            } else {
                this.g.f(Y + 1);
                return;
            }
        }
    }

    public final void J0() throws IOException {
        long Y = this.f.Y(n);
        e eVar = this.g;
        if (Y == -1) {
            Y = eVar.b;
        }
        eVar.f(Y);
    }

    public void close() throws IOException {
        this.h = 0;
        this.b[0] = 8;
        this.a = 1;
        this.g.n();
        this.f.close();
    }

    public int h0() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        String str = " at path ";
        String str2 = "Expected an int but was ";
        int i2;
        int[] iArr;
        int i3;
        StringBuilder g;
        if (i == 16) {
            long j = this.i;
            i2 = (int) j;
            if (j == ((long) i2)) {
                this.h = 0;
                iArr = this.d;
                i3 = this.a - 1;
                iArr[i3] = iArr[i3] + 1;
                return i2;
            }
            g = c.b.a.a.a.g(str2);
            g.append(this.i);
            g.append(str);
            g.append(s());
            throw new a(g.toString());
        }
        if (i == 17) {
            this.k = this.g.t0((long) this.j);
        } else if (i == 9 || i == 8) {
            String F0;
            if (i == 9) {
                F0 = F0(m);
            } else {
                F0 = F0(l);
            }
            this.k = F0;
            try {
                i = Integer.parseInt(F0);
                this.h = 0;
                int[] iArr2 = this.d;
                int i4 = this.a - 1;
                iArr2[i4] = iArr2[i4] + 1;
                return i;
            } catch (NumberFormatException unused) {
            }
        } else if (i != 11) {
            g = c.b.a.a.a.g(str2);
            g.append(u0());
            g.append(str);
            g.append(s());
            throw new a(g.toString());
        }
        this.h = 11;
        try {
            double parseDouble = Double.parseDouble(this.k);
            i2 = (int) parseDouble;
            if (((double) i2) == parseDouble) {
                this.k = null;
                this.h = 0;
                iArr = this.d;
                i3 = this.a - 1;
                iArr[i3] = iArr[i3] + 1;
                return i2;
            }
            g = c.b.a.a.a.g(str2);
            g.append(this.k);
            g.append(str);
            g.append(s());
            throw new a(g.toString());
        } catch (NumberFormatException unused2) {
            g = c.b.a.a.a.g(str2);
            g.append(this.k);
            g.append(str);
            g.append(s());
            throw new a(g.toString());
        }
    }

    public void n() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 3) {
            v0(1);
            this.d[this.a - 1] = 0;
            this.h = 0;
            return;
        }
        StringBuilder g = c.b.a.a.a.g("Expected BEGIN_ARRAY but was ");
        g.append(u0());
        g.append(" at path ");
        g.append(s());
        throw new a(g.toString());
    }

    public void o() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 1) {
            v0(3);
            this.h = 0;
            return;
        }
        StringBuilder g = c.b.a.a.a.g("Expected BEGIN_OBJECT but was ");
        g.append(u0());
        g.append(" at path ");
        g.append(s());
        throw new a(g.toString());
    }

    public void q() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 4) {
            i = this.a - 1;
            this.a = i;
            int[] iArr = this.d;
            i--;
            iArr[i] = iArr[i] + 1;
            this.h = 0;
            return;
        }
        StringBuilder g = c.b.a.a.a.g("Expected END_ARRAY but was ");
        g.append(u0());
        g.append(" at path ");
        g.append(s());
        throw new a(g.toString());
    }

    public void r() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 2) {
            i = this.a - 1;
            this.a = i;
            this.c[i] = null;
            int[] iArr = this.d;
            i--;
            iArr[i] = iArr[i] + 1;
            this.h = 0;
            return;
        }
        StringBuilder g = c.b.a.a.a.g("Expected END_OBJECT but was ");
        g.append(u0());
        g.append(" at path ");
        g.append(s());
        throw new a(g.toString());
    }

    public String s0() throws IOException {
        String G0;
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 14) {
            G0 = G0();
        } else if (i == 13) {
            G0 = F0(m);
        } else if (i == 12) {
            G0 = F0(l);
        } else if (i == 15) {
            G0 = this.k;
        } else {
            StringBuilder g = c.b.a.a.a.g("Expected a name but was ");
            g.append(u0());
            g.append(" at path ");
            g.append(s());
            throw new a(g.toString());
        }
        this.h = 0;
        this.c[this.a - 1] = G0;
        return G0;
    }

    public boolean t() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        return (i == 2 || i == 4 || i == 18) ? false : true;
    }

    public String t0() throws IOException {
        String G0;
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 10) {
            G0 = G0();
        } else if (i == 9) {
            G0 = F0(m);
        } else if (i == 8) {
            G0 = F0(l);
        } else if (i == 11) {
            G0 = this.k;
            this.k = null;
        } else if (i == 16) {
            G0 = Long.toString(this.i);
        } else if (i == 17) {
            G0 = this.g.t0((long) this.j);
        } else {
            StringBuilder g = c.b.a.a.a.g("Expected a string but was ");
            g.append(u0());
            g.append(" at path ");
            g.append(s());
            throw new a(g.toString());
        }
        this.h = 0;
        int[] iArr = this.d;
        int i2 = this.a - 1;
        iArr[i2] = iArr[i2] + 1;
        return G0;
    }

    public String toString() {
        StringBuilder g = c.b.a.a.a.g("JsonReader(");
        g.append(this.f);
        g.append(")");
        return g.toString();
    }

    public b u0() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        switch (i) {
            case 1:
                return b.BEGIN_OBJECT;
            case 2:
                return b.END_OBJECT;
            case 3:
                return b.BEGIN_ARRAY;
            case 4:
                return b.END_ARRAY;
            case 5:
            case 6:
                return b.BOOLEAN;
            case 7:
                return b.NULL;
            case 8:
            case 9:
            case 10:
            case 11:
                return b.STRING;
            case 12:
            case 13:
            case 14:
            case 15:
                return b.NAME;
            case 16:
            case 17:
                return b.NUMBER;
            case 18:
                return b.END_DOCUMENT;
            default:
                throw new AssertionError();
        }
    }

    public boolean v() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        int[] iArr;
        int i2;
        if (i == 5) {
            this.h = 0;
            iArr = this.d;
            i2 = this.a - 1;
            iArr[i2] = iArr[i2] + 1;
            return true;
        } else if (i == 6) {
            this.h = 0;
            iArr = this.d;
            i2 = this.a - 1;
            iArr[i2] = iArr[i2] + 1;
            return false;
        } else {
            StringBuilder g = c.b.a.a.a.g("Expected a boolean but was ");
            g.append(u0());
            g.append(" at path ");
            g.append(s());
            throw new a(g.toString());
        }
    }

    public double w() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 16) {
            this.h = 0;
            int[] iArr = this.d;
            int i2 = this.a - 1;
            iArr[i2] = iArr[i2] + 1;
            return (double) this.i;
        }
        StringBuilder g;
        String str = "Expected a double but was ";
        String str2 = " at path ";
        if (i == 17) {
            this.k = this.g.t0((long) this.j);
        } else if (i == 9) {
            this.k = F0(m);
        } else if (i == 8) {
            this.k = F0(l);
        } else if (i == 10) {
            this.k = G0();
        } else if (i != 11) {
            g = c.b.a.a.a.g(str);
            g.append(u0());
            g.append(str2);
            g.append(s());
            throw new a(g.toString());
        }
        this.h = 11;
        try {
            double parseDouble = Double.parseDouble(this.k);
            if (Double.isNaN(parseDouble) || Double.isInfinite(parseDouble)) {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.append("JSON forbids NaN and infinities: ");
                stringBuilder.append(parseDouble);
                stringBuilder.append(str2);
                stringBuilder.append(s());
                throw new b(stringBuilder.toString());
            }
            this.k = null;
            this.h = 0;
            int[] iArr2 = this.d;
            int i3 = this.a - 1;
            iArr2[i3] = iArr2[i3] + 1;
            return parseDouble;
        } catch (NumberFormatException unused) {
            g = c.b.a.a.a.g(str);
            g.append(this.k);
            g.append(str2);
            g.append(s());
            throw new a(g.toString());
        }
    }

    public int w0(a aVar) throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i < 12 || i > 15) {
            return -1;
        }
        if (i == 15) {
            return C0(this.k, aVar);
        }
        i = this.f.r0(aVar.b);
        if (i != -1) {
            this.h = 0;
            this.c[this.a - 1] = aVar.a[i];
            return i;
        }
        String str = this.c[this.a - 1];
        String s0 = s0();
        int C0 = C0(s0, aVar);
        if (C0 == -1) {
            this.h = 15;
            this.k = s0;
            this.c[this.a - 1] = str;
        }
        return C0;
    }

    public void x0() throws IOException {
        int i = this.h;
        if (i == 0) {
            i = B0();
        }
        if (i == 14) {
            J0();
        } else if (i == 13) {
            I0(m);
        } else if (i == 12) {
            I0(l);
        } else if (i != 15) {
            StringBuilder g = c.b.a.a.a.g("Expected a name but was ");
            g.append(u0());
            g.append(" at path ");
            g.append(s());
            throw new a(g.toString());
        }
        this.h = 0;
        this.c[this.a - 1] = "null";
    }

    public void y0() throws IOException {
        int i;
        int i2 = 0;
        do {
            i = this.h;
            if (i == 0) {
                i = B0();
            }
            if (i == 3) {
                v0(1);
            } else if (i == 1) {
                v0(3);
            } else {
                String str = " at path ";
                String str2 = "Expected a value but was ";
                StringBuilder g;
                if (i == 4) {
                    i2--;
                    if (i2 >= 0) {
                        this.a--;
                    } else {
                        g = c.b.a.a.a.g(str2);
                        g.append(u0());
                        g.append(str);
                        g.append(s());
                        throw new a(g.toString());
                    }
                } else if (i == 2) {
                    i2--;
                    if (i2 >= 0) {
                        this.a--;
                    } else {
                        g = c.b.a.a.a.g(str2);
                        g.append(u0());
                        g.append(str);
                        g.append(s());
                        throw new a(g.toString());
                    }
                } else if (i == 14 || i == 10) {
                    J0();
                } else if (i == 9 || i == 13) {
                    I0(m);
                } else if (i == 8 || i == 12) {
                    I0(l);
                } else if (i == 17) {
                    this.g.f((long) this.j);
                } else if (i == 18) {
                    g = c.b.a.a.a.g(str2);
                    g.append(u0());
                    g.append(str);
                    g.append(s());
                    throw new a(g.toString());
                }
                this.h = 0;
            }
            i2++;
            this.h = 0;
        } while (i2 != 0);
        int[] iArr = this.d;
        i2 = this.a;
        i = i2 - 1;
        iArr[i] = iArr[i] + 1;
        this.c[i2 - 1] = "null";
    }
}
